package com.example.arouter_annotations.bean;

/**
 * 单个RouterBean信息
 */
public class ARouterBean {
    String path;
    String group;

    Class<?> classType;

    TYPE_ENUM typeEnum;
   public enum TYPE_ENUM {
        ACTIVITY_TYPE;
    }

    public String getPath() {
        return path;
    }

    public String getGroup() {
        return group;
    }

    public Class<?> getClassType() {
        return classType;
    }

    public TYPE_ENUM getTypeEnum() {
        return typeEnum;
    }

    private ARouterBean(String path, String group,TYPE_ENUM typeEnum, Class<?> classType) {
        this.path = path;
        this.group = group;
        this.classType = classType;
        this.typeEnum = typeEnum;
    }

  public static ARouterBean create(String path, String group,TYPE_ENUM typeEnum, Class<?> classType) {
      return new ARouterBean(path, group,typeEnum,classType);
  }



   public static class Builder {
        String path;
        String group;
        TYPE_ENUM typeEnum;

        Class<?> classType;

        public Builder setTypeEnum(TYPE_ENUM typeEnum) {
            this.typeEnum = typeEnum;
            return this;
        }

        public Builder setPath(String path) {
            this.path = path;
            return this;
        }

        public Builder setGroup(String group) {
            this.group = group;
            return this;
        }

        public void setClassType(Class<?> classType) {
            this.classType = classType;
        }

        public ARouterBean build() {
            return new ARouterBean(path, group,typeEnum,classType);
        }
    }

    @Override
    public String toString() {
        return "ARouterBean{" +
                "path='" + path + '\'' +
                ", group='" + group + '\'' +
                ", classType=" + classType +
                ", typeEnum=" + typeEnum +
                '}';
    }
}
